package com.tencent.sr.iris.activity.interfaces.client.task;

import com.tencent.sr.iris.activity.interfaces.request.task.GroupTaskListNewRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.GroupTaskPopRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.GroupTaskRewardDetailRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.GroupTaskRewardRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.MarketTaskCalenderRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.UserAwardInfoRequest;
import com.tencent.sr.iris.activity.interfaces.response.activity.UserAwardInfoResponse;
import com.tencent.sr.iris.activity.interfaces.response.group.task.GroupTaskConfigResponse;
import com.tencent.sr.iris.activity.interfaces.response.group.task.GroupTaskListResponse;
import com.tencent.sr.iris.activity.interfaces.response.group.task.GroupTaskPopResponse;
import com.tencent.sr.iris.activity.interfaces.response.group.task.GroupTaskRewardDetailResponse;
import com.tencent.sr.iris.activity.interfaces.response.group.task.GroupTaskRewardResponse;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import com.tencent.sr.rmall.common.request.PaginationRequest;
import com.tencent.sr.rmall.common.response.PaginationResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "iris-activity-core-service", contextId = "IrisGroupTaskClient",
        path = "/api/v1/iris/iris-activity-core-service/task")
public interface IrisGroupTaskClient {

    @PostMapping("/hello")
    @ApiOperation(value = "hello")
    HttpResult<String> hello();

    @PostMapping("/awardInfo")
    @ApiOperation(value = "查询权益信息")
    HttpResult<UserAwardInfoResponse> awardInfo(@RequestBody @Validated UserAwardInfoRequest request);

    @PostMapping("/pop")
    @ApiOperation(value = "首页弹窗")
    HttpResult<GroupTaskPopResponse> pop(@RequestBody @Validated GroupTaskPopRequest request);

    @PostMapping("/config")
    @ApiOperation(value = "查询团长任务配置")
    HttpResult<GroupTaskConfigResponse> config();

    @PostMapping("/reward")
    @ApiOperation(value = "查询团长任务奖励金")
    HttpResult<GroupTaskRewardResponse> taskReward(@RequestBody @Validated GroupTaskRewardRequest request);

    @PostMapping("/pageRewardList")
    @ApiOperation(value = "分页查团长任务奖励详情")
    HttpResult<PaginationResponse<GroupTaskRewardDetailResponse>> pageRewardList(
            @RequestBody @Validated PaginationRequest<GroupTaskRewardDetailRequest> request);

    @PostMapping("/list/inProgress")
    @ApiOperation(value = "查询团长任务列表-进行中")
    HttpResult<PaginationResponse<GroupTaskListResponse>> listInProgress(
            @RequestBody @Validated PaginationRequest<GroupTaskListNewRequest> request);

    @PostMapping("/list/ended")
    @ApiOperation(value = "查询团长任务列表-已结束")
    HttpResult<PaginationResponse<GroupTaskListResponse>> listEnded(
            @RequestBody @Validated PaginationRequest<GroupTaskListNewRequest> request);

    @PostMapping("/list/market/calendar")
    @ApiOperation(value = "查询营销日历团长任务列表")
    HttpResult<List<GroupTaskListResponse>> marketCalendarList(
            @RequestBody @Validated MarketTaskCalenderRequest request);

    @PostMapping("/getAwardInfoByActivityAndTask")
    @ApiOperation(value = "获取预估收益-通过activityId和taskId缓存")
    HttpResult<UserAwardInfoResponse> getAwardInfoByActivityAndTask(
            @RequestBody @Validated UserAwardInfoRequest request);

}
